package carstore.ui.interfaces;

import carstore.ui.models.Car;
import carstore.ui.models.User;
import java.util.List;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

//@FeignClient("user-service")
@FeignClient("gateway")
	public interface UserClient {
	@RequestMapping(method = RequestMethod.GET, value = "/userserver/all")
	    List<User> getAllUsers();

	@RequestMapping(method = RequestMethod.GET, value = "/userserver/getuser?UserId={UserId}")
	    List<User> getUserbyUserId(@PathVariable("UserId") int UserId);

	@RequestMapping(method = RequestMethod.GET, value = "/userserver/carsbyuser?UserId={UserId}")
	public List<Car> getCarsbyUserId(@PathVariable("UserId") int UserId);
	
	@RequestMapping(method = RequestMethod.POST, value = "/userserver/setselectstatus?UserId={UserId}&CarId={CarId}")
	public void setCarSelectStatus(@PathVariable("UserId")Integer UserId,@PathVariable("CarId")Integer CarId);
}
